package com.winit.flow.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * 流程和req关联表 这个表在req打版本的时候也要备份版本
 */
@Entity
@Table(name = "matrix_flow_req")
@IdClass(FlowReqRelationId.class)
@DynamicUpdate
@DynamicInsert
public class FlowReqRelation {
    @Id
    @Column(name = "flow_id")
    private String flowId;
    @Id
    @Column(name = "req_id")
    private String reqId;
    @Column(name = "attr_config_id")
    private String attrConfigId;
    @Column(name = "version")
    private String version;     //req在提交版本的时候，当前的关联关系也需要备份，为空时表示当前编辑中版本，不为空时已经备份的版本号
    @Column(name = "status")
    private String status;  //ADD/UPDATE/NODE_UPDATE/DELETE'


    public String getFlowId() {
        return flowId;
    }

    public void setFlowId(String flowId) {
        this.flowId = flowId;
    }

    public String getReqId() {
        return reqId;
    }

    public void setReqId(String reqId) {
        this.reqId = reqId;
    }

    public String getAttrConfigId() {
        return attrConfigId;
    }

    public void setAttrConfigId(String attrConfigId) {
        this.attrConfigId = attrConfigId;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
